package com.buaa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "project")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Project implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue
	@Column(name = "id")
	private Integer id;

	// 单位名称(1)
	@Column(name = "unit_name", columnDefinition = "varchar(50) default ''")
	private String unit_name;

	// 单位编码(2)
	// @ManyToOne(targetEntity = Institution.class, cascade = CascadeType.ALL)
	// @JoinColumn(name = "code", columnDefinition = "bigint(13)")
	@Column(name = "unit_code", columnDefinition = "bigint(13)")
	private Long unit_code;

	// 项目名称/资源名称(3) -- 冗余
	// 产品/产品类别(4)
	@Column(name = "type", columnDefinition = "varchar(170) default ''")
	private String type;

	// 限制范围_备注(5)
	@Column(name = "bound", columnDefinition = "varchar(180) default ''")
	private String bound;

	// 产业(6)
	@Column(name = "industry1", columnDefinition = "varchar(50) default ''")
	private String industry1;

	// 检测领域(父)(7)
	@Column(name = "df_parent", columnDefinition = "varchar(20) default ''")
	private String df_parent; // detection field = df

	// 行业类别（父）(8)
	@Column(name = "ic_parent", columnDefinition = "varchar(20) default ''")
	private String ic_parent; // idustry catagory = ic

	// 黑龙江产业(9)
	@Column(name = "industry2", columnDefinition = "varchar(30) default ''")
	private String industry2;

	// 检测价格(10)
	@Column(name = "detection_price", columnDefinition = "int(11) default -1")
	private Integer detection_price;

	// 检测标准(11)
	@Column(name = "detection_criterion", columnDefinition = "varchar(300) default ''")
	private String detection_criterion;

	// 检测周期(12)
	@Column(name = "detection_period", columnDefinition = "varchar(20) default ''")
	private String detection_period;

	// 服务图片(13)
	@Column(name = "pic", columnDefinition = "varchar(70) default ''")
	private String pic;

	// 委托书 (14)
	@Column(name = "proxy", columnDefinition = "varchar(80) default ''")
	private String proxy;

	// 新增时间 (15)
	@Column(name = "create_time", columnDefinition = "datetime default '1000-01-01'")
	private Date create_time;

	// 修改时间 (16)
	@Column(name = "update_time", columnDefinition = "datetime default '1000-01-01'")
	private Date update_time;

	// 联系人(17)
	@Column(name = "contact_person", columnDefinition = "varchar(50) default ''")
	private String contact_person;

	// 联系人电话(18)
	@Column(name = "contact_phone", columnDefinition = "varchar(40) default ''")
	private String contact_phone;

	// 联系人传真(19)
	@Column(name = "contact_fax", columnDefinition = "varchar(30) default ''")
	private String contact_fax;

	// 联系人邮箱(20)
	@Column(name = "contact_email", columnDefinition = "varchar(50) default ''")
	private String contact_email;

	// 产品/产品类别(21)--冗余
	// 单位地址(22)
	@Column(name = "unit_addr", columnDefinition = "varchar(50) default ''")
	private String unit_addr;

	// 单位所在城市(23)
	@Column(name = "unit_city", columnDefinition = "varchar(10) default ''")
	private String unit_city;

	// 单位名称(24)--冗余
	// 检测领域(子)(25)
	@Column(name = "df_child", columnDefinition = "varchar(30) default ''")
	private String df_child;

	// 行业类别（子）(26)
	@Column(name = "ic_child", columnDefinition = "varchar(30) default ''")
	private String ic_child;

	@Column(name = "lng", columnDefinition = "float(9,6) default 0")
	private Float lng;

	@Column(name = "lat", columnDefinition = "float(9,6) default 0")
	private Float lat;

	public Project() {
	}

	public Project(Integer id, String unit_name, Long unit_code, String type, String bound, String industry1,
			String df_parent, String ic_parent, String industry2, Integer detection_price, String detection_criterion,
			String detection_period, String pic, String proxy, Date create_time, Date update_time,
			String contact_person, String contact_phone, String contact_fax, String contact_email, String unit_addr,
			String unit_city, String df_child, String ic_child, Float lng, Float lat) {
		super();
		this.id = id;
		this.unit_name = unit_name;
		this.unit_code = unit_code;
		this.type = type;
		this.bound = bound;
		this.industry1 = industry1;
		this.df_parent = df_parent;
		this.ic_parent = ic_parent;
		this.industry2 = industry2;
		this.detection_price = detection_price;
		this.detection_criterion = detection_criterion;
		this.detection_period = detection_period;
		this.pic = pic;
		this.proxy = proxy;
		this.create_time = create_time;
		this.update_time = update_time;
		this.contact_person = contact_person;
		this.contact_phone = contact_phone;
		this.contact_fax = contact_fax;
		this.contact_email = contact_email;
		this.unit_addr = unit_addr;
		this.unit_city = unit_city;
		this.df_child = df_child;
		this.ic_child = ic_child;
		this.lng = lng;
		this.lat = lat;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUnit_name() {
		return unit_name;
	}

	public void setUnit_name(String unit_name) {
		this.unit_name = unit_name;
	}

	public Long getUnit_code() {
		return unit_code;
	}

	public void setUnit_code(Long unit_code) {
		this.unit_code = unit_code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getBound() {
		return bound;
	}

	public void setBound(String bound) {
		this.bound = bound;
	}

	public String getIndustry1() {
		return industry1;
	}

	public void setIndustry1(String industry1) {
		this.industry1 = industry1;
	}

	public String getDf_parent() {
		return df_parent;
	}

	public void setDf_parent(String df_parent) {
		this.df_parent = df_parent;
	}

	public String getIc_parent() {
		return ic_parent;
	}

	public void setIc_parent(String ic_parent) {
		this.ic_parent = ic_parent;
	}

	public String getIndustry2() {
		return industry2;
	}

	public void setIndustry2(String industry2) {
		this.industry2 = industry2;
	}

	public Integer getDetection_price() {
		return detection_price;
	}

	public void setDetection_price(Integer detection_price) {
		this.detection_price = detection_price;
	}

	public String getDetection_criterion() {
		return detection_criterion;
	}

	public void setDetection_criterion(String detection_criterion) {
		this.detection_criterion = detection_criterion;
	}

	public String getDetection_period() {
		return detection_period;
	}

	public void setDetection_period(String detection_period) {
		this.detection_period = detection_period;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public String getProxy() {
		return proxy;
	}

	public void setProxy(String proxy) {
		this.proxy = proxy;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public Date getUpdate_time() {
		return update_time;
	}

	public void setUpdate_time(Date update_time) {
		this.update_time = update_time;
	}

	public String getContact_person() {
		return contact_person;
	}

	public void setContact_person(String contact_person) {
		this.contact_person = contact_person;
	}

	public String getContact_phone() {
		return contact_phone;
	}

	public void setContact_phone(String contact_phone) {
		this.contact_phone = contact_phone;
	}

	public String getContact_fax() {
		return contact_fax;
	}

	public void setContact_fax(String contact_fax) {
		this.contact_fax = contact_fax;
	}

	public String getContact_email() {
		return contact_email;
	}

	public void setContact_email(String contact_email) {
		this.contact_email = contact_email;
	}

	public String getUnit_addr() {
		return unit_addr;
	}

	public void setUnit_addr(String unit_addr) {
		this.unit_addr = unit_addr;
	}

	public String getUnit_city() {
		return unit_city;
	}

	public void setUnit_city(String unit_city) {
		this.unit_city = unit_city;
	}

	public String getDf_child() {
		return df_child;
	}

	public void setDf_child(String df_child) {
		this.df_child = df_child;
	}

	public String getIc_child() {
		return ic_child;
	}

	public void setIc_child(String ic_child) {
		this.ic_child = ic_child;
	}

	public Float getLng() {
		return lng;
	}

	public void setLng(Float lng) {
		this.lng = lng;
	}

	public Float getLat() {
		return lat;
	}

	public void setLat(Float lat) {
		this.lat = lat;
	}

	@Override
	public String toString() {
		return "Resource [id=" + id + ", unit_name=" + unit_name + ", unit_code=" + unit_code + ", type=" + type
				+ ", bound=" + bound + ", industry1=" + industry1 + ", df_parent=" + df_parent + ", ic_parent="
				+ ic_parent + ", industry2=" + industry2 + ", detection_price=" + detection_price
				+ ", detection_criterion=" + detection_criterion + ", detection_period=" + detection_period + ", pic="
				+ pic + ", proxy=" + proxy + ", create_time=" + create_time + ", update_time=" + update_time
				+ ", contact_person=" + contact_person + ", contact_phone=" + contact_phone + ", contact_fax="
				+ contact_fax + ", contact_email=" + contact_email + ", unit_addr=" + unit_addr + ", unit_city="
				+ unit_city + ", df_child=" + df_child + ", ic_child=" + ic_child + ", lng=" + lng + ", lat=" + lat
				+ "]";
	}

}
